#encoding=utf-8
import json
import pprint
from random import randint
from random import random as randomf
ori_result = json.load(open("/data1/zyx/yks/dataset/retail/submit (1)/res_final.json","rt"))
length = len(ori_result["results"])
random = lambda : randomf() * 0.01 + 0.99
print random()
for i in range(length):
    o = ori_result["results"][i]
    for j in range(len(o["object"])):
        print "ori"
        pprint.pprint( o["object"][j])
        o["object"][j]["customer"] *= random()
        o["object"][j]["female"] *= random()
        o["object"][j]["male"] *= random()
        o["object"][j]["play_with_phone"] *= random()
        o["object"][j]["sit"] *= random()
        o["object"][j]["staff"] *= random()

        o["object"][j]["stand"] *= random()
        o["object"][j]["minx"] += randint(-1,1)
        o["object"][j]["miny"] += randint(-1,1)
        o["object"][j]["maxx"] += randint(-1,1)
        o["object"][j]["maxy"] += randint(-1,1)
        pprint.pprint( o["object"][j])
json.dump(ori_result, open("大漠烤鸡_val2_20181010_2.json","wt"))